/* ── LORE PAGE — lore.css ── */

.lore-hero {
  position: relative; z-index: 1;
  background: var(--charcoal);
  padding: 64px 24px 48px;
  text-align: center;
  border-bottom: 2px solid var(--gold-dim);
  overflow: hidden;
}
.lore-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.03) 1px, transparent 1px);
  background-size: 32px 32px; pointer-events: none;
}
.lore-hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 100% at 50% 50%, transparent 30%, var(--charcoal) 100%);
  pointer-events: none;
}
.lore-hero-inner { position: relative; z-index: 1; }
.lore-hero-title {
  font-family: var(--pixel); font-size: clamp(14px, 3vw, 24px);
  color: var(--gold); letter-spacing: 5px;
  text-shadow: 3px 3px 0 var(--blood); margin: 20px 0 12px; line-height: 1.6;
}
.lore-hero-sub { font-family: var(--pixel); font-size: 8px; color: var(--mist-dim); letter-spacing: 4px; }

.lore-disclaimer-wrap {
  background: var(--ash); border-bottom: 1px solid rgba(201,168,76,0.15);
  padding: 24px; display: flex; justify-content: center;
}
.lore-disclaimer {
  display: flex; align-items: flex-start; gap: 16px; max-width: 760px;
  border: 1px solid var(--blood); border-left: 3px solid var(--blood-bright);
  background: rgba(139,26,26,0.07); padding: 18px 22px;
}
.lore-disclaimer-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.lore-disclaimer p { font-family: var(--pixel); font-size: 8px; color: var(--mist-dim); line-height: 2.4; letter-spacing: 0.5px; }
.lore-disclaimer p strong { color: var(--mist); font-weight: 400; }

/* ═══════════ BOOK SCENE ═══════════ */
.book-scene {
  background: #080604;
  padding: 72px 24px 80px;
  display: flex; flex-direction: column;
  align-items: center; gap: 40px;
}

.book-container {
  width: 100%; max-width: 1020px;
  position: relative;
}

/* Drop shadow beneath the book */
.book-container::after {
  content: '';
  position: absolute;
  bottom: -20px; left: 5%; right: 5%;
  height: 40px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.7) 0%, transparent 70%);
  pointer-events: none;
}

/* ── THE SPREAD ── */
.book {
  display: flex;
  width: 100%;
  position: relative;
  border-radius: 2px;
  box-shadow:
    0 2px 0 #1a0900,
    0 4px 0 #120600,
    0 24px 60px rgba(0,0,0,0.95),
    0 0 0 1px rgba(201,168,76,0.12);
}

/* Thick cover boards */
.book::before {
  content: '';
  position: absolute;
  top: -6px; bottom: -6px;
  left: -8px; right: -8px;
  background: #1c0900;
  border-radius: 4px;
  z-index: -1;
  box-shadow:
    inset 0 0 0 2px rgba(201,168,76,0.15),
    0 0 60px rgba(0,0,0,0.8);
}

/* ── PAGES ── */
.book-left, .book-right {
  flex: 1;
  min-height: 580px;
  position: relative;
  padding: 48px 44px 44px;
  display: flex; flex-direction: column;
  transition: opacity 0.35s ease;

  /* Parchment */
  background-color: #f0e6ce;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E"),
    linear-gradient(170deg, #f5ead8 0%, #e8d8b4 60%, #ddc898 100%);
  color: #1a0800;
}

.book-left {
  border-radius: 2px 0 0 2px;
  box-shadow:
    inset -30px 0 50px rgba(0,0,0,0.15),
    inset -4px 0 10px rgba(0,0,0,0.1);
}
.book-right {
  border-radius: 0 2px 2px 0;
  box-shadow:
    inset 30px 0 50px rgba(0,0,0,0.12),
    inset 4px 0 8px rgba(0,0,0,0.08);
}

/* Page turning fade */
.book.turning .book-left,
.book.turning .book-right { opacity: 0; }

/* Corner curl on right page */
.book-right::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 28px; height: 28px;
  background: linear-gradient(225deg, rgba(90,50,10,0.14) 50%, transparent 50%);
  border-radius: 0 0 2px 0;
  pointer-events: none;
}

/* ── SPINE ── */
.book-spine-center {
  width: 36px; flex-shrink: 0;
  background: linear-gradient(
    to right,
    #1a0900 0%, #5c2800 18%, #7a3a00 35%,
    #8a4800 50%, #7a3a00 65%, #5c2800 82%, #1a0900 100%
  );
  position: relative;
  box-shadow:
    inset 3px 0 6px rgba(0,0,0,0.6),
    inset -3px 0 6px rgba(0,0,0,0.6);
}
.book-spine-center::before {
  content: '';
  position: absolute;
  left: 50%; transform: translateX(-50%);
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(201,168,76,0.2);
}

/* ── PAGE HEADER ── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(90,40,0,0.2);
}
.page-header-title { font-family: var(--pixel); font-size: 7px; color: rgba(90,40,0,0.45); letter-spacing: 3px; }
.page-header-num   { font-family: var(--pixel); font-size: 7px; color: rgba(90,40,0,0.35); letter-spacing: 2px; }

/* ── PAGE FOOTER ── */
.page-footer {
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid rgba(90,40,0,0.18);
  display: flex; justify-content: center;
}
.page-footer-orn { font-family: var(--pixel); font-size: 7px; color: rgba(90,40,0,0.3); letter-spacing: 6px; }

/* ── CHAPTER / TITLE ── */
.page-chapter { font-family: var(--pixel); font-size: 7px; color: #7a1a1a; letter-spacing: 5px; margin-bottom: 8px; }
.page-title   { font-family: var(--pixel); font-size: clamp(9px, 1.5vw, 13px); color: #1a0800; letter-spacing: 3px; line-height: 1.8; margin-bottom: 8px; }

.page-rule { display: flex; align-items: center; gap: 8px; margin: 8px 0 16px; opacity: 0.3; }
.page-rule-line { flex: 1; height: 1px; background: #5a2000; }
.page-rule-diamond { font-size: 7px; color: #5a2000; font-family: var(--pixel); }

/* ── BODY TEXT ── */
.page-text {
  font-family: var(--pixel); font-size: 9px;
  color: #2a1000; line-height: 2.6; letter-spacing: 0.3px; margin-bottom: 12px;
}
.page-text strong { color: #0f0500; font-weight: 400; border-bottom: 1px solid rgba(122,26,26,0.25); }
.page-text em     { color: #7a3a00; font-style: normal; }
.page-text.muted  { font-size: 8px; color: #5a3010; opacity: 0.8; }

/* ── TITLE PAGE ── */
.page-title-spread {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 14px;
  padding: 20px 0;
}
.title-main {
  font-family: var(--pixel); font-size: clamp(12px, 1.8vw, 16px);
  color: #1a0800; letter-spacing: 5px; line-height: 1.9;
}
.title-sub  { font-family: var(--pixel); font-size: 8px; color: #5a2000; letter-spacing: 4px; }
.title-orn  { font-family: var(--pixel); font-size: 8px; color: rgba(90,32,0,0.35); letter-spacing: 7px; }
.title-quote {
  font-family: var(--pixel); font-size: 8px; color: #5a3010;
  line-height: 2.6; max-width: 260px; margin-top: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(90,40,0,0.18);
  border-bottom: 1px solid rgba(90,40,0,0.18);
}

/* ── PANTHEON ── */
.page-pantheon { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 12px; }
.pantheon-col { padding: 12px; border: 1px solid rgba(90,40,0,0.2); background: rgba(90,40,0,0.04); }
.pantheon-col.dark { border-color: rgba(122,26,26,0.25); background: rgba(122,26,26,0.04); }
.pantheon-title { font-family: var(--pixel); font-size: 7px; color: #5a2000; letter-spacing: 3px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid rgba(90,40,0,0.15); }
.pantheon-col.dark .pantheon-title { color: #7a1a1a; }
.pantheon-item { font-family: var(--pixel); font-size: 7px; color: #2a1000; line-height: 2.3; }
.pantheon-item strong { font-weight: 400; }

/* ── RACES ── */
.page-race-list { display: flex; flex-direction: column; gap: 9px; margin: 6px 0; }
.race-entry { border-left: 2px solid rgba(122,26,26,0.35); padding: 8px 11px; background: rgba(90,40,0,0.03); }
.race-name  { font-family: var(--pixel); font-size: 9px; color: #1a0800; letter-spacing: 2px; margin-bottom: 3px; }
.race-subs  { font-family: var(--pixel); font-size: 7px; color: #7a1a1a; letter-spacing: 2px; margin-bottom: 5px; }
.race-desc  { font-family: var(--pixel); font-size: 8px; color: #2e1200; line-height: 2.2; }

/* ── COUNTIES ── */
.page-counties { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.county-item { border: 1px solid rgba(90,40,0,0.25); padding: 10px 12px; background: rgba(90,40,0,0.04); text-align: center; }
.county-name { font-family: var(--pixel); font-size: 8px; color: #1a0800; letter-spacing: 2px; }

/* ── TIMELINE ── */
.page-timeline { display: flex; flex-direction: column; position: relative; padding-left: 20px; }
.page-timeline::before {
  content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(to bottom, rgba(90,40,0,0.35), rgba(122,26,26,0.45));
}
.timeline-item { display: flex; gap: 12px; padding: 6px 0; position: relative; }
.tl-dot { width: 8px; height: 8px; border: 1px solid rgba(90,40,0,0.4); background: #f0e6ce; flex-shrink: 0; position: absolute; left: -23px; top: 9px; }
.timeline-item.highlight .tl-dot { background: #7a1a1a; border-color: #c0392b; }
.tl-text { font-family: var(--pixel); font-size: 8px; color: #2a1000; line-height: 2.3; }
.tl-text strong { font-weight: 400; color: #1a0800; }
.timeline-item.highlight .tl-text strong { color: #7a1a1a; }

/* ── EPILOGUE CTA ── */
.page-epilogue-cta { margin-top: 16px; display: flex; justify-content: center; }
.btn-book {
  font-family: var(--pixel); font-size: 8px; letter-spacing: 2px;
  padding: 12px 20px; background: #7a1a1a; color: #f0e6ce;
  border: 1px solid #c0392b; text-decoration: none; display: inline-block;
  transition: background 0.15s;
}
.btn-book:hover { background: #c0392b; }

/* ── NAV ── */
.book-nav { display: flex; align-items: center; gap: 28px; justify-content: center; }
.book-btn {
  font-family: var(--pixel); font-size: 8px; letter-spacing: 2px;
  color: var(--gold); background: none; border: 1px solid var(--gold-dim);
  padding: 11px 20px; cursor: pointer; transition: background 0.15s, transform 0.1s;
}
.book-btn:hover { background: rgba(201,168,76,0.1); }
.book-btn:active { transform: scale(0.95); }
.book-btn:disabled { opacity: 0.2; cursor: default; }
.book-btn:disabled:hover { background: none; }
.book-page-counter { font-family: var(--pixel); font-size: 8px; color: var(--mist-dim); letter-spacing: 3px; min-width: 80px; text-align: center; }

.book-chapters { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.chapter-dot { width: 8px; height: 8px; background: var(--gold-dim); opacity: 0.3; cursor: pointer; border: none; padding: 0; transition: opacity 0.2s, background 0.2s; }
.chapter-dot.active { background: var(--gold); opacity: 1; }
.chapter-dot:hover { opacity: 0.6; }

/* ── RESPONSIVE ── */
@media (max-width: 800px) {
  .book { flex-direction: column; }
  .book-spine-center { width: 100%; height: 18px; background: linear-gradient(to bottom, #1a0900, #6a3000, #1a0900); }
  .book-left  { border-radius: 2px 2px 0 0; box-shadow: inset 0 -8px 20px rgba(0,0,0,0.1); }
  .book-right { border-radius: 0 0 2px 2px; box-shadow: inset 0 8px 20px rgba(0,0,0,0.08); }
  .book-right::after { display: none; }
  .page-pantheon, .page-counties { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .book-left, .book-right { padding: 32px 22px 36px; min-height: auto; }
  .lore-disclaimer { flex-direction: column; }
  .book-scene { padding: 40px 12px 56px; }
}